@import 'utils';

img {
  object-fit: cover;
}

.background100 {
  -webkit-background-size: 100%;
  background-size: 100%;
  background-repeat: no-repeat;
}

.shopIcon_masker {
  position: absolute;
  top: rem(9px);
  left: 0;
  padding: 0 rem(8px);
}
.noData-box{
  position: fixed;
  width:100%;
  height:100%;
  top:rem(45px);
  left:0;
  background-color: #fff;
  .noData {
    position: absolute;
    top:50%;
    left:0;
    width:100%;
    text-align: center;
    img {
      display: block;
      width: rem(150px);
      margin: rem(-150px) auto 0;
    }
    .text {
      color: #999;
      text-align: center;
      font-size: rem(14px);
      padding: rem(10px) 0 rem(20px);
      line-height: rem(20px);
    }
  }
}
//搜索头部
.search-outer {
  z-index: 99;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  padding: rem(8px) rem(16px) rem(8px) rem(16px);
  background: $bgWhite;
  .back {
    height: rem(20px);
    margin: rem(4px) 0;
    .icon-back {

    }
  }
  &.hasback {
    #search_form {
      margin-left: rem(22px);
    }
  }
  &.shop-search-head {
    #search_form {
      padding: 0 rem(24px) 0 rem(28px);
      .btn-search {
        left: 0;
      }
    }
  }
  .search-cart {
    position: absolute;
    top: rem(8px);
    right: rem(16px);
    background: url("../images/icon_cart.png") no-repeat right top;
    width: rem(32px);
    height: rem(28px);
    background-size: auto 100%;
    &.active {
      background: url("../images/icon_cart_active.png") no-repeat right top;
      background-size: auto 100%;
    }
    button {
      position: absolute;
      top: 0;
      right: rem(-4px);
      padding: rem(1px) rem(3px);
      border-radius: rem(6px);
      height: rem(12px);
      font-size: rem(10px);
      background-color: #ff5c33;
      color: #fff;
    }
  }
  .search-cacel {
    position: absolute;
    top: rem(8px);
    right: rem(16px);
    width: rem(32px);
    height: rem(28px);
    line-height: rem(28px);
    color: #777;
    text-align: right;
  }
  #search_form {
    position: relative;
    padding: 0 rem(24px) 0 rem(114px);
    -webkit-border-radius: rem(28px);
    border-radius: rem(28px);
    background: #f5f5f5;
    .search-type {
      position: absolute;
      top: 0;
      left: rem(12px);
      width: rem(66px);
      height: rem(28px);
      line-height: rem(28px);
      .search-line {
        position: absolute;
        top: rem(4px);
        right: rem(-8px);
        width: 0;
        height: rem(20px);
      }
      .search-ico-close {
        position: absolute;
        top: 0;
        right: 0;
        width: rem(6px);
        height: rem(28px);
        background: url("../images/icon_search-close.png") no-repeat center;
        -webkit-background-size: 100% auto;
        background-size: 100% auto;
      }
      .search-type-text {
        font-size: rem(12px);
      }
      ul {
        display: none;
        z-index: 3;
        position: absolute;
        top: rem(32px);
        left: rem(-12px);
        background-color: #fff;
        width: rem(84px);
        border-radius: rem(5px);
        li {
          position: relative;
          padding: 0 0 0 rem(12px);
          height: rem(40px);
          line-height: rem(40px);
          font-size: rem(13px);
          color: #777;
        }
        li.active {
          color: #464646;
          &:after {
            position: absolute;
            right: rem(8px);
            top: rem(18px);
            content: '';
            width: rem(4px);
            height: rem(4px);
            background: #ff5d3d;
            -webkit-border-radius: 50%;
            border-radius: 50%;
          }
        }
      }
      &.on {
        .search-ico-close {
          transform: rotate(180deg);
        }
        ul {
          display: block;
        }

      }
    }
    .btn-search {
      position: absolute;
      left: rem(86px);
      top: 0;
      width: rem(28px);
      height: rem(28px);
      background: url("../images/icon_search1.png") no-repeat center;
      -webkit-background-size: rem(15px) rem(15px);
      background-size: rem(15px) rem(15px);
      &.active {
        background: url("../images/icon_search_active.png") no-repeat center;
        -webkit-background-size: rem(15px) rem(15px);
        background-size: rem(15px) rem(15px);
      }
    }
    .search-result-num {
      position: absolute;
      top: 0;
      right: rem(30px);
      display: inline-block;
      height: rem(28px);
      line-height: rem(28px);
      text-align: right;
      font-size: rem(12px);
      color: #999;
    }
    input {
      width: 100%;
      height: rem(28px);
      text-align: left;
      font-size: rem(12px);
      background-color: transparent;
    }
    i {
      position: absolute;
      right: rem(8px);
      top: 50%;
      display: block;
      width: rem(14px);
      height: rem(14px);
      margin-top: rem(-7px);
      @extend .background100;
      background-image: url("../images/del.png");
      visibility: hidden;
      &.visible {
        visibility: visible;
      }
    }
  }
}

//分类首页样式
#catalog-box {
  padding: rem(75px) 0 0;
  background-color: #fff;
}

.catalog-canyin, .catalog-caoshi {
  .header {
    padding: 0 0 rem(24px);
    text-align: center;
    margin: 0 auto;
    a {
      display: block;
      img {
        width: 38%;
        height: auto;
      }
    }
  }
  .caoshi-list {
    padding: 0 6% rem(10px);
    .li {
      float: left;
      width: 29%;
      padding-right: 6.5%;
      padding-bottom:rem(20px);
      &:nth-child(3n) {
        padding-right: 0;
      }
      &:nth-child(4) a .text,&:nth-child(5) a .text,&:nth-child(6) a .text{
        color:#6c7228;
      }
      &:nth-child(7) a .text,&:nth-child(8) a .text,&:nth-child(9) a .text{
        color:#5c6b38;
      }
      &:nth-child(10) a .text,&:nth-child(11) a .text,&:nth-child(12) a .text{
        color:#445f36;
      }
      box-sizing: content-box;
      margin-bottom: rem(25px);
      a {
        display: block;
        position: relative;
        .text {
          position: absolute;
          bottom: rem(-28px);
          left: 0;
          width: 100%;
          color: #665c00;
          font-size: rem(14px);
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          text-align: center;
          margin: 0 auto;

          span {
           /* display: inline-block;
            background-color: #3c3c39;
            padding: 0 rem(6px);
            border-radius: rem(9px);*/
            height: rem(18px);
            line-height: rem(18px);
          }
        }
      }
      img {
        border-radius: 50%;
      }
    }
  }
  .canyin-list {
    padding: 0 6%;
    .li {
      float: left;
      width: 27%;
      padding: 0 9.5% 0 0;
      box-sizing: content-box;
      margin-bottom: rem(25px);
      &:nth-child(3n){
          padding:0;
      }
      a {
        display: block;
        position: relative;
        overflow: hidden;
        img {
          width: 100%;
        }
        .catalog-masker {
          position: absolute;
          bottom: -159%;
          left: -19%;
          background-color: rgba(255,255,255,0.7);
          width: 200%;
          height: 200%;
          border-top: 1px solid #999;
          -webkit-transform: rotate(-30deg);
          transform: rotate(-30deg);
        }
        .text {
          width: 80%;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
          position: absolute;
          bottom: 0;
          left: 10%;
          text-align:right;
          font-size: rem(16px);
        }
      }
    }

  }
}

@media only screen and (max-device-width: 375px) {

}

@media only screen and (max-device-width: 320px) {
  .catalog-canyin .header a {
    left: rem(36px);
    right: rem(36px);
  }
  .catalog-canyin .catalog-level1 {
    margin: rem(18px) rem(28px) 0;
  }
}